<!DOCTYPE html>
<html xmlns:th="http//www.thymeleaf.org">
<head>
    <title>碇甄社区</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="/css/luntan.css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
</head>
<body>
<div th:insert="~{navigation :: nav}"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h2><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 发现</h2>
            <hr>
            <tr th:each="postDTO : ${paginationDTO.postDTOs}">
                <div class="media">
                <div class="media-left">
                    <a href="#">
                        <img class="media-object img-rounded" th:src="${postDTO.user.avatarUrl}">
                    </a>
                </div>
                <div class="media-body">
                    <a th:href="@{/post(id=${postDTO.id})}">
                        <h4 class="media-heading" th:text="${postDTO.title}"></h4>
                    </a>
                    <span th:text="${postDTO.discription}"></span>
                    <span class="text-desc">
                        <span th:text="${postDTO.viewCount}"></span>次观看，
                        <span th:text="${postDTO.likeCount}"></span>个点赞，
                        <span th:text="${postDTO.commentCount}"></span>个评论，
                        发帖时间：<span th:text="${#dates.format(postDTO.gmtCreate, 'dd MMMM yyyy HH:mm:ss')}"></span>
                    </span>
                </div>
            </div>
            </tr>
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li th:if="${paginationDTO.showFirstPage}">
                        <a th:href="@{/(page=1)}" aria-label="First page">
                            <span>&laquo;</span>
                        </a>
                    </li>
                    <li th:if="${paginationDTO.showPrevious}">
                        <a th:href="@{/(page=${paginationDTO.page - 1})}" aria-label="Previous">
                            <span>&lt;</span>
                        </a>
                    </li>
                    <tr th:each="page : ${paginationDTO.pages}">
                        <li th:class="${paginationDTO.page} == ${page} ? 'active' : ''">
                            <a th:href="@{/(page=${page})}">
                                <span th:text="${page}"></span>
                            </a>
                        </li>
                    </tr>
                    <li th:if="${paginationDTO.showNext}">
                        <a th:href="@{/(page=${paginationDTO.page + 1})}" aria-label="Next">
                            <span>&gt;</span>
                        </a>
                    </li>
                    <li th:if="${paginationDTO.showLastPage}">
                        <a th:href="@{/(page=${paginationDTO.lastPage})}" aria-label="Last page">
                            <span>&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <h3>热门</h3>
            宜研盯真，知识学爆！
        </div>
    </div>
</div>
</body>
</html>